package com.woniu.user.mqlistener;

import com.woniu.user.service.AccountService;
import com.woniu.user.service.VenueService;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@RocketMQMessageListener(topic = "venueregister-check-topic", consumerGroup = "venueregistercheck")
@Slf4j
public class VenueRegisterCheckListener implements RocketMQListener<String> {
    @Resource
    private VenueService venueService;

    @Override
    public void onMessage(String mail) {
        venueService.closeRegister(mail);
    }

}
